package MyProxy.Jdk;

import MyProxy.IUserDao;
import MyProxy.UserDao;

/**
 * Created by sunyuming on 18/4/29.
 */
public class Main {
    public static void main(String []args){
        // 目标对象
        IUserDao target = new UserDao();

        // 给目标对象，创建代理对象
        IUserDao proxy = (IUserDao) new ProxyFactory(target).getProxyInstance();

        // 执行方法   【代理对象】
        proxy.save();

    }
}
